package org.example.mall.Mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.example.mall.Pojo.Products;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface ProductsMapper {

    //获取全部商品预览信息
    @Select("select * from Products")
    List<Products> getProductsList();

    //通过商品Id获取预览信息
    @Select("select * from Products where pId = #{pId}")
    Products findByPId(String pId);
}
